package com.ssy.wireless.web.service;

import com.ssy.wireless.entity.Enterprise;
import com.ssy.wireless.mapper.EnterpriseMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * Created by cofey on 16/11/20.
 */
@Service
@Transactional(readOnly = true)
public class EnterpriseService {
    @Autowired
    private EnterpriseMapper enterpriseMapper;

    public Enterprise findById(Long id) {
        return enterpriseMapper.selectByPrimaryKey(id);
    }

    public List<Enterprise> find(Map<String, Object> params) {
        return enterpriseMapper.select(params);
    }
}
